{extend name="../../admin/view/main"}

{block name="button"}
<!--{if auth("add")}-->
<button class='layui-btn layui-btn-sm layui-btn-primary' data-modal='{:url("add")}'>添加入库物资</button>
<!--{/if}-->

{/block}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white">

    <div class="layui-tab-content">
        {include file='control/enter_storehouse/index_search'}
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='list-table-check-td think-checkbox'>
                    <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
                </th>
                <th class='list-table-sort-td'>
                    <button class="layui-btn layui-btn-xs" data-reload type="button">刷 新</button>
                </th>
                <th class='text-left nowrap'></th>
                <th class='text-left nowrap'>入库标题</th>
                <th class='text-left nowrap'>所属仓库</th>
                <th class='text-left nowrap'>物资所属</th>
                <th class='text-left nowrap'>状态</th>
                <th class='text-left nowrap'>入库时间</th>
                <th class='text-left nowrap'>操作人</th>
                <th class='text-left nowrap'></th>
                <th></th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr data-dbclick>
                <td class='list-table-check-td think-checkbox'>
                    <label><input class="list-check-box" type='checkbox' value='{$vo.id}'></label>
                </td>
                <td class='list-table-sort-td'>
                    <label><input class="list-sort-input" data-action-blur="{:request()->url()}" data-loading="false" data-value="id#{$vo.id};action#sort;sort#{value}" value="{$vo.sort}"></label>
                </td>
                <td class='nowrap'>

                </td>
                <td class='nowrap'>
                    <div class="inline-block text-top sub-span-blue">
                        <div>入库标题：<span>{$vo.title|default='--'}</span></div>
                    </div>
                </td>
                <td class='nowrap'>
                    <div class="inline-block text-top sub-span-blue">
                        <div>所属仓库：<span>{$vo.storehouse_name|default='--'}</span></div>
                    </div>
                </td>
                <td class='nowrap'>
                    <div class="inline-block text-top sub-span-blue">
                        <div>所属人：<span>{$vo.admin_name|default='--'}</span></div>
                    </div>
                </td>
                <td class="nowrap">
                    {if $vo.status eq 0}
                    <span class="layui-badge layui-bg-orange">待入库</span><br>
                    {else /}
                    <span class="layui-badge layui-bg-blue">已入库</span>
                    {/if}
                </td>
                <td class='nowrap'>
                    <div class="inline-block text-top sub-span-blue">
                        <div>时间：<span>{$vo.enter_time|default='--'}</span></div>
                    </div>
                </td>
                <td class='nowrap'>
                    <div class="inline-block text-top sub-span-blue">
                        <div>操作人：<span>{$vo.operate_name|default='--'}</span></div>
                    </div>
                </td>

                <td class='nowrap'>

                </td>
                <td class='nowrap sub-strong-blue'>
                    <!--{if auth("detail")}-->
                    <a class="layui-btn layui-btn-xs layui-btn-normal" data-dbclick data-modal='{:url("detail")}?id={$vo.id}'>详 情</a>
                    <!--{else}-->
                    <a class="layui-btn layui-btn-xs layui-btn-normal layui-btn-primary layui-disabled" data-tips-text="您没有查看详情的权限哦！">详 情</a>
                    <!--{/if}-->
                    
                    {if $vo.status eq 0}
                    <!--{if auth("edit")}-->
                    <a class="layui-btn layui-btn-xs" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                    <!--{else}-->
                    <a class="layui-btn layui-btn-xs layui-btn-primary layui-disabled" data-tips-text="您没有编辑的权限哦！">编 辑</a>
                    <!--{/if}-->
                    {if isset($type) and $type eq 'index'}
                    <!--{if auth("remove")}-->
                    <!--<a class="layui-btn layui-btn-xs layui-btn-danger" data-action="{:url('remove')}" data-confirm="确定要移入回收站吗？" data-value="id#{$vo.id};deleted#1">删 除</a>-->
                    <!--{/if}-->
                    {else}
                    <!--{if auth("remove")}-->
                    <a class="layui-btn layui-btn-xs layui-btn-normal" data-action="{:url('remove')}" data-value="id#{$vo.id};deleted#0">恢 复</a>
                    <!--{/if}-->
                    {/if}
                    <!--{if auth("confirmReceipt")}-->
                    <a class="layui-btn layui-btn-warm layui-btn-xs" data-action="{:url('confirmReceipt')}" data-confirm="确定要入库吗？"  data-value="id#{$vo.id};status#1">确认入库</a>
                    <!--{/if}-->
                    {/if}
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
    <script>form.render()</script>
</div>
{/block}